chore: updating eth-json-rpc-middleware#398
Conversation
There was a problem hiding this comment.
Looks good, upgrade package and change imports due to having a named import vs default import prior.
In this review I would note that I do not know if there is any issue with running this specific version and what impact that may have, but the changes are minimal and expected considering a basic update to a new version.
mcmire
left a comment
There was a problem hiding this comment.
Hi @martinheidegger — sorry for the delay in responding to this. Changes mostly look good, just a few suggestions based on how eth-json-rpc-middleware should be used now.
| @@ -1,5 +1,5 @@ | |||
| const ProviderSubprovider = require('./json-rpc-engine-middleware') | |||
| const createBlockCacheMiddleware = require('eth-json-rpc-middleware/block-cache') | |||
| const { createBlockCacheMiddleware } = require('eth-json-rpc-middleware/dist/block-cache') | |||
There was a problem hiding this comment.
Accessing exports beyond the main file are no longer recommended (and in the future may be prohibited). You should be able to say:
| const { createBlockCacheMiddleware } = require('eth-json-rpc-middleware/dist/block-cache') | |
| const { createBlockCacheMiddleware } = require('eth-json-rpc-middleware') |
| @@ -1,5 +1,5 @@ | |||
| const ProviderSubprovider = require('./json-rpc-engine-middleware') | |||
| const createFetchMiddleware = require('eth-json-rpc-middleware/fetch') | |||
| const { createFetchMiddleware } = require('eth-json-rpc-middleware/dist/fetch') | |||
There was a problem hiding this comment.
| const { createFetchMiddleware } = require('eth-json-rpc-middleware/dist/fetch') | |
| const { createFetchMiddleware } = require('eth-json-rpc-middleware') |
| @@ -1,5 +1,5 @@ | |||
| const ProviderSubprovider = require('./json-rpc-engine-middleware') | |||
| const createInflightCacheMiddleware = require('eth-json-rpc-middleware/inflight-cache') | |||
| const { createInflightCacheMiddleware } = require('eth-json-rpc-middleware/dist/inflight-cache') | |||
There was a problem hiding this comment.
| const { createInflightCacheMiddleware } = require('eth-json-rpc-middleware/dist/inflight-cache') | |
| const { createInflightCacheMiddleware } = require('eth-json-rpc-middleware') |
|
Revisiting this pull request. Thank you for the submission, but we are actively phasing out this package in favor of |
In order to update the
eth-json-rpc-middlewarethe requirestatements had to change, but other changes in v8 are minor and the changes in v7 do not seem to impact any use.